This is a non-interactive map built with basic ggplot2 functions. See code here.
This is a plotly interactive map created by submitting the previous ggplot2 map to the plotly::ggplotly() function. See code here.
I don’t care for how the tooltips only deploy when the mouse approaches the center of a polygon. It should pop up when the mouse is over any part of a polygon.
Interactive choropleth via plotly::plot_ly(). See code here
There is something odd going on with the aspect ratio. I’m guessing it is to do with how the coordinate system in the shape file is being interpreted. The really strange thing is that I’m using the same shape file here as for the ggplotly map. Whatever the cause, it needs to be fixed.
Nothing here, yet.
Interactive choropleth via leaflet::leaflet(). See code here.
Previous plots in this series used multipolygon shapes for towns taken from conventional shape files. I couldn’t get that to work with leaflet and so switched to simple polygons. These were read from geojson files, but I think the crucial difference is multipolygon vs. somple polygons.
I don’t know why the colorscale in the legend is inverted. Needs to be fixed.
Nothing here, yet.
Put some notes here.
Covid data for these figures was compiled by CT Dept. of Public Health through Mar 28, 2022 and accessed through https://data.ct.gov/stories/s/COVID-19-data/wa3g-tfvc/#data-library.
Figures were created by David Braze (davebraze@gmail.com) using R statistical software and released under the Creative Commons v4.0 CC-by license.
All data summaries in this dashboard were produced with the R statistical environment, version 4.1.0. The dashboard itself was made using an Rmarkdown workflow. The following table lists the non-base R packages used in building the dashboard. To see a full citation for a specific package, assuming you have both R and the particular package installed, call (e.g.) citation("dplyr") from the R prompt.
| package | version | date |
|---|---|---|
| dplyr | 1.0.7 | 2021-06-18 |
| FDBpub | 0.0.1 | 2022-01-29 |
| FDButils | 0.0.10 | 2022-01-29 |
| flexdashboard | 0.5.2 | 2020-06-24 |
| forcats | 0.5.1 | 2021-01-27 |
| fs | 1.5.2 | 2021-12-08 |
| ggplot2 | 3.3.5 | 2021-06-25 |
| ggpmisc | 0.4.5 | 2021-12-11 |
| ggpp | 0.4.3 | 2021-12-17 |
| here | 1.0.1 | 2020-12-13 |
| htmltools | 0.5.2 | 2021-08-25 |
| htmlwidgets | 1.5.4 | 2021-09-08 |
| httr | 1.4.2 | 2020-07-20 |
| leaflet | 2.0.4.1 | 2021-01-07 |
| lubridate | 1.8.0 | 2021-10-07 |
| plotly | 4.10.0 | 2021-10-09 |
| purrr | 0.3.4 | 2020-04-17 |
| RCurl | 1.98.1.5 | 2021-09-17 |
| readr | 2.1.1 | 2021-11-30 |
| RSocrata | 1.7.11.2 | 2021-09-14 |
| sf | 1.0.5 | 2021-12-17 |
| stringr | 1.4.0 | 2019-02-10 |
| wordstonumbers | 1.0.1 | 2020-11-13 |
| XML | 3.99.0.8 | 2021-09-17 |